linux.kernel
[Top] [All Lists]

[PATCH 7/10] fuse: consolidate device errors

Subject: [PATCH 7/10] fuse: consolidate device errors
From: Miklos Szeredi
Date: Fri, 31 Mar 2006 20:00:37 +0200
Newsgroups: linux.kernel
Return consistent error values for the case when the opened device
file has no mount associated yet.

Signed-off-by: Miklos Szeredi <miklos@xxxxxxxxxx>

Index: linux/fs/fuse/dev.c
===================================================================
--- linux.orig/fs/fuse/dev.c    2006-03-31 18:55:31.000000000 +0200
+++ linux/fs/fuse/dev.c 2006-03-31 18:55:32.000000000 +0200
@@ -739,7 +739,7 @@ static ssize_t fuse_dev_writev(struct fi
        struct fuse_copy_state cs;
        struct fuse_conn *fc = fuse_get_conn(file);
        if (!fc)
-               return -ENODEV;
+               return -EPERM;
 
        fuse_copy_init(&cs, fc, 0, NULL, iov, nr_segs);
        if (nbytes < sizeof(struct fuse_out_header))
@@ -930,7 +930,7 @@ static int fuse_dev_fasync(int fd, struc
 {
        struct fuse_conn *fc = fuse_get_conn(file);
        if (!fc)
-               return -ENODEV;
+               return -EPERM;
 
        /* No locking - fasync_helper does its own locking */
        return fasync_helper(fd, file, on, &fc->fasync);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at                                  www.tux.org/lkml/">http://www.tux.org/lkml/

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy